package test.spider.jd.util;

import com.jfinal.plugin.activerecord.ActiveRecordPlugin;
import com.jfinal.plugin.druid.DruidPlugin;

import test.model.Goods;

public class DBUtil {
	
	static String jdbcUrl = "jdbc:mysql://192.168.2.10:3306/solr_use?characterEncoding=UTF-8";
	static String username = "root";
	static String password = "123456";
	
	public static void init() {
		DruidPlugin dp = new DruidPlugin(jdbcUrl, username, password);
		ActiveRecordPlugin arp = new ActiveRecordPlugin(dp);
		arp.setDevMode(true);
		arp.setShowSql(true);
		arp.addMapping("goods", Goods.class);
		
		dp.start();
		arp.start();
	}

}
